/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.googlecode.javalearningproject.VEK_ME.GUI;

import com.sun.kvem.midp.pim.ToDoImpl;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.Layer;
import javax.microedition.lcdui.game.TiledLayer;

/**
 *
 * @author Administrator
 */
public class BackgroundLayer extends TiledLayer {
    private int columns;
    private int rows;
    private Image image;
    private int tileWidth;
    private int tileHeight;
    
    public BackgroundLayer(int col, int row, Image im, int tw, int th)
    {
        super(col, row, im, tw, th);
        columns = col;
        rows = row;
        im = image;
        tileWidth = tw;
        tileHeight = th;
        
        //methods
        initSetCells();
    }
    
    private void initSetCells()
    {
        for(int y = 0, tileIndex = 1; y < columns; y++)
        {
            for(int x = 0; x < rows; x++, tileIndex++)
            {
                setCell(x, y, tileIndex);
            }
        }
    }
    
    
    
    
    
    

}
